/*
 *  PlayState.h
 *
 *  Created by Jason Townes French on 4/30/08.
 *
 */

#ifndef __PLAYSTATE_H__
#define __PLAYSTATE_H__



//STL Headers
#include <deque>
#include <stdlib.h>
#include <string.h>

//OGRE Headers

//#include <OIS/OIS.h>
#include <Ogre.h>


//OGRE Add-ons
#include <OgreNewt.h>
#include <OgreTextAreaOverlayElement.h>
#include <OgreFontManager.h>

//Include all NewView Class Headers
#include "GameState.h"
#include "SoundEngine.h";
#include "NVFrameListener.h"

//Macros

// Custom parameter bindings
#define CUSTOM_SHININESS 1
#define CUSTOM_DIFFUSE 2
#define CUSTOM_SPECULAR 3


class PlayState : public GameState
{
	public:
		void enter(Ogre::Root* r);
		void exit();
		
		void pause();
		void resume();
		
		void chooseSceneManager();
		void createCamera();
		void createViewports();
		void createScene();
		void createFrameListener();
		void loadResources();
		bool canCellShade();
		
		SoundEngine* getSoundEngine();
		
		AnimationState* mCamAnimState;
		SceneNode* camNode;
		
	private:
		OgreNewt::World* mWorld;
		
	protected:
		Ogre::Root* mRoot;
		SceneManager* mSceneMgr;
		Camera* mCamera;
		NVFrameListener* mFrameListener;
		RenderWindow* mWindow;
		//Animation-specific class members
		Entity* mEntity;			// The entity of the object we are animating
		SceneNode* mNode;			// The SceneNode of the object we are moving
		std::deque<Vector3> mWalkList;	// A deque containing the waypoints
		BetaGUI::GUI* mGui;
		
		//Sound-stuff
		SoundEngine* mSoundEngine;
		
		//More physics-stuff
		OgreNewt::Body* makeSimpleBox(Ogre::Vector3& size, Ogre::Vector3& pos, Ogre::Quaternion& orient);
		Ogre::FrameListener* mNewtonListener; //a listener dedicated just for newton updates
};

#endif